<template>
    <div class="wall-index">
        <top-bar></top-bar>
        <video src="@/assets/video/qm1.mp4" autoplay="autoplay" muted="nuted" loop="loop" class="bg-video"></video>
        <router-view></router-view>
        <foot-bar></foot-bar>
    </div>
</template>

<script>
    import topBar from '@/components/TopBar.vue'
    import footBar from '@/components/FootBar.vue'
    import {signIpApi} from '@/api/index.js'
    export default {
    data() {
        return {
            aaa: '',
        };
    },
    components: {
        // 组件
        topBar,
        footBar
    },
    computed: {
        // 计算属性
    },
    created() {
        this.getUser();
    },
    mounted() {
        // mounted 钩子通常用于初始化需要 DOM 节点的操作
    },
    methods: {
        getUser() {
            signIpApi().then((res)=> {
                // console.log(res);
                let user = {
                    id: res.ip
                }
                this.$store.commit('getUser', user)

            })
        }
    }
}
</script>

<style lang="less" scoped>
    .wall-index {
        margin: 0;
        padding: 0;
        
        .bg-video {
            height: 800px;
            position: fixed;
            top: 0;
            left: 0;
            z-index: -1;
        }
    }
</style>